package com.resolution.dietaryassessment.view.chronic;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

import com.resolution.dietaryassessment.BaseActivity;
import com.resolution.dietaryassessment.R;
import com.resolution.dietaryassessment.listener.MyListener;

public class ResultActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result);
        initView();
    }

    public void initView() {
        Button mDietary, mTcm, mLeave, mRestart;
        TextView mFraction_Tx;
        mFraction_Tx = findViewById(R.id.fraction_tx);
        mDietary = findViewById(R.id.my_dietary);
        mTcm = findViewById(R.id.tcm_btn);
        mLeave = findViewById(R.id.leave_btn);
        mRestart = findViewById(R.id.restart_btn);

        mFraction_Tx.setText(getIntent().getStringExtra("fraction"));

        mRestart.setOnClickListener(v -> start(ChronicDiseaseActivity.class));
        mDietary.setOnClickListener(new MyListener(this));
        mTcm.setOnClickListener(new MyListener(this));
        mLeave.setOnClickListener(new MyListener(this));
    }
}
